package com.bdqn.springboot.contorller;

import com.bdqn.springboot.dome.comm.KtjiaoyuInfo;
import com.bdqn.springboot.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class Contorller {
    @Resource
    private KtjiaoyuInfo ktjiaoyuInfo;
    @Autowired
    private DemoService demoService;
//    @Value("${com.ktjiaoyu.name}")
//    private String name;
//    @Value("${com.ktjiaoyu.email}")
//    private String email;

    @RequestMapping("hii")
    public String hello() {
        String mag = demoService.sayHolle();
        mag += " "+ktjiaoyuInfo.getName() +" "+ktjiaoyuInfo.getEmail();
        return mag;
    }
}
